<template>
  <div class="qt">
    <router-view></router-view>
    <van-tabbar v-model="active">
      <van-tabbar-item icon="home-o">home</van-tabbar-item>
      <van-tabbar-item icon="search">firend</van-tabbar-item>
      <van-tabbar-item icon="friends-o">my</van-tabbar-item>
    </van-tabbar>
  </div>
</template>
<script>
export default {
  name:"Qt",
  data () {
    return {
      active:0
    }
  },
  watch:{
    active(cur,old){
      if(cur === 0){
        this.$router.replace({path:'/qtly/home'});
      } else if (cur === 1){
        this.$router.replace({path:'/qtly/firend'});
      } else if(cur === 2){
        this.$router.replace({path:'/qtly/my'});
      }
    }
  },
  methods:{

  }
}
</script>